package com.aixin.csopservice.controller;


import com.aixin.csopservice.domain.MessageDomain;
import com.aixin.csopservice.model.MessageModel;
import com.aixin.csopservice.service.MessageService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
import org.springframework.data.domain.Page;
import org.springframework.web.bind.annotation.*;


@RestController
@RequestMapping("/message")
@EnableAutoConfiguration
public class MessageController {

    @Autowired
    MessageService messageService;

    @RequestMapping(value ="/getMessage")
    public Page<MessageDomain> getMessage(MessageModel messageModel, int pageNum, int pageSize){
        return messageService.getMessage(messageModel,pageNum,pageSize);
    }

}
